package com.zmn.oms.dubbo.interfaces.zmn.master.order;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.common.dio.attachment.ModifyOrderWorkAttachmentDIO;
import com.zmn.oms.common.dio.normal.pay.WaitPayDIO;
import com.zmn.oms.dubbo.dto.common.SimpleResultDRO;
import com.zmn.oms.dubbo.dto.common.work.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.constraints.NotNull;

/**
 * 类描述：师傅工单服务
 *
 * @author heciqi
 * @date 2020/03/27 11:00
 */
public interface MasterWorkRemoteService {

	/**
	 * 工程师接单
	 * @param masterTakeDIO
	 */
	ResponseDTO<WorkListDRO> takeOrder(MasterTakeDIO masterTakeDIO);

	/**
	 * 联系用户
	 * @param contactUserDIO
	 * @return
	 */
	ResponseDTO contactUser(ContactUserDIO contactUserDIO);

	/**
	 *  工程师出发
	 * @param masterLeaveDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyMasterLeave(MasterLeaveDIO masterLeaveDIO);

	/**
	 * 上门服务
	 * @param masterVisitDIO
	 */
	ResponseDTO<MasterVisitResponseDRO> visitServ(MasterVisitDIO masterVisitDIO);

	/**
	 * 完成工单
	 * @param completeOrderDIO
	 */
	ResponseDTO<WorkListDRO> completeOrder(CompleteOrderDIO completeOrderDIO);

	/**
	 * 改价格
	 * @param changePriceDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyPrice(ChangePriceDIO changePriceDIO);

	/**
	 * 优惠
	 * @param procDiscountDIO
	 */
	ResponseDTO<WorkDetailDRO> procDiscount(ProcDiscountDIO procDiscountDIO);

	/**
	 * 纸质保修卡
	 * @param manualCodeDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyManualCode(ManualCodeDIO manualCodeDIO);

	/**
	 * 工程师备注
	 * @param masterRemarkDIO
	 */
	ResponseDTO<MasterRemarkResponseDRO> modifyMasterRemark(MasterRemarkDIO masterRemarkDIO);

	/**
	 * 保修项
	 * @param procWarrantyDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyWarranty(ProcWarrantyDIO procWarrantyDIO);

	/**
	 * 服务项
	 * @param procServiceItemDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyServiceItem(ProcServiceItemDIO procServiceItemDIO);

	/**
	 * 获取优惠价
	 * @param procServiceItemDIO
	 */
	ResponseDTO<Integer> getDiscount(ProcServiceItemDIO procServiceItemDIO);

	/**
	 * 贴花照片
	 * @param orderImageDIO
	 */
	ResponseDTO modifyAppliqueImage(OrderImageDIO orderImageDIO);

	/**
	 * 工单照片
	 * @param orderImageDIO
	 */
	ResponseDTO modifyOrderImage(OrderImageDIO orderImageDIO);

	/**
	 * 工单工程师照片
	 * @param orderImageDIO
	 */
	ResponseDTO modifyMasterImage(OrderImageDIO orderImageDIO);

	/**
	 * 检查工程师是否有进行中工单
	 * @param checkMasterWorkStatusDIO
	 */
	ResponseDTO<Boolean> checkMasterWorkStatus(CheckMasterWorkStatusDIO checkMasterWorkStatusDIO);

	/**
	 * 检查工程师是否有进行中工单(区分返回值)
	 * @param checkMasterWorkStatusDIO
	 */
	ResponseDTO<MasterWorkStatusDRO> getMasterWorkStatus(CheckMasterWorkStatusDIO checkMasterWorkStatusDIO);

	/**
	 * 检查工单优惠状态
	 * @param masterWorkDIO
	 */
	ResponseDTO checkDiscountStatus(MasterWorkDIO masterWorkDIO);

	/**
	 * 检查是否可以修改预约时间
	 * @param modifyDutyTimeDIO
	 */
	ResponseDTO<SimpleResultDRO> checkModifyDutyTime(ModifyDutyTimeDIO modifyDutyTimeDIO);

	/**
	 * 修改预约时间
	 * @param modifyDutyTimeDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyDutyTime(ModifyDutyTimeDIO modifyDutyTimeDIO);

	/**
	 * 改派工程师
	 * @param modifyDutyTimeDIO
	 */
	ResponseDTO modifyDutyTimeWithNoStock(ModifyDutyTimeDIO modifyDutyTimeDIO);

	/**
	 * 改派工程师
	 * @param changeMasterDIO
	 */
	ResponseDTO<WorkListDRO> modifyDistributeMaster(ChangeMasterDIO changeMasterDIO);

	/**
	 * 修改产品，并且重设订单的计价器类
	 * @param modifyProductDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyProduct(ModifyProductDIO modifyProductDIO);

	/**
	 * 修改产品，并且重设订单的计价器类
	 * @param modifyProductDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyBrand(ModifyProductDIO modifyProductDIO);

	/**
	 * 修改定金
	 * @param modifyDepositAmountDIO
	 */
	ResponseDTO<Boolean> modifyDepositAmount(ModifyDepositAmountDIO modifyDepositAmountDIO);

	/**
	 * 修改订单报价（仅针对计价器类型订单调用，不修改订单的计价器类型）
	 * @param modifyQuotationDIO
	 */
	ResponseDTO<WorkDetailDRO> modifyOrderQuotation(ModifyQuotationDIO modifyQuotationDIO);

	/**
	 * 发送用户报价模板消息
	 * @param masterWorkDIO
	 */
	ResponseDTO<Boolean> sendQuotationWechatTemplate(MasterWorkDIO masterWorkDIO);

	/**
	 * 检查修改产品
	 * @param modifyProductDIO
	 */
	ResponseDTO<Boolean> checkUpdateProduct(ModifyProductDIO modifyProductDIO);

	/**
	 * 验证完成核销码
	 * @param verifyCompleteCodeDIO
	 * @return
	 */
	ResponseDTO verifyCompleteCode(VerifyCompleteCodeDIO verifyCompleteCodeDIO);


	/**
	 * 小号延绑
	 * @param XNOBindDIO
	 */
	ResponseDTO<OrderDelayBindDRO> delayBind(XnoBindDIO XNOBindDIO);


	/***
	 * 校验是否延保产品
	 * @param baseRequestDIO
	 * @return
	 */
	ResponseDTO<Boolean> checkExtensionInsuranceAppliances(BaseRequestDIO baseRequestDIO);

	/**
	 * @Description 根据易碎贴编码查询延保单信息
	 * @Author xiaofei
	 * @Param AddedValueOrderDIO
	 * @Return ResponseDTO<ValueAddedInfoDRO>
	 * @Version 1.0
	 * @Date 2020-06-04 16:34
	 */
	ResponseDTO<ValueAddedInfoDRO> getExtendedWarrantyInfoByCode(AddedValueOrderDIO addedValueOrderDIO);

	/**
	 * 获取师傅代用户报价
	 * @param
	 */
	ResponseDTO<Integer> countMasterFirstQuotation(MasterFirstQuotationDIO masterFirstQuotationDIO);

	/***
	 * 记录通话记录log
	 * @param callRecordDIO
	 * @return
	 */
	//ResponseDTO<Boolean> callRecordLog(CallRecordDIO callRecordDIO);

	/**
	 * 获取师傅是否需要填写完成码
	 * @param
	 */
	@ApiOperation(value = "判断工程师是否需要填完成码", response = ResponseDTO.class)
	ResponseDTO<Boolean> needCompleteCode(@ApiParam(value = "订单号") Long orderId, @ApiParam(value = "工单号") Long workId);


	/**
	 * 校验服务完成
	 * @param dio
	 * @return
	 */
	@ApiOperation(value = "校验工程师操作服务完成", response = ResponseDTO.class)
	ResponseDTO<Integer> checkServiceComplete(ServiceCompleteDIO dio);

	/**
	 * 服务完成
	 * @param
	 */
	@ApiOperation(value = "工程师操作服务完成", response = ResponseDTO.class)
	ResponseDTO<Integer> serviceComplete(@ApiParam(value = "工单号、完成码（非必填）,操作人ID") ServiceCompleteDIO dio);

	/**
	 * 师傅重置审核状态
	 * @param
	 */
	@ApiOperation(value = "工程师重置审核状态", response = ResponseDTO.class)
	ResponseDTO revertServiceComplete(@ApiParam(value = "工单号、操作人ID") ServiceCompleteDIO dio);


	/**
	 * 保存工单附件照片
	 * @param
	 */
	@ApiOperation(value = "保存工单附件照片", response = ResponseDTO.class)
	ResponseDTO modifyOrderAttachment(@ApiParam(value = "附件照片") ModifyOrderAttachmentDIO dio);

	/**
	 * 保存工单难度系数
	 * @param
	 */
	@ApiOperation(value = "保存工单难度系数", response = ResponseDTO.class)
	ResponseDTO modifyOrderDifficultRatio(@ApiParam(value = "难度系数") ModifyOrderDiffcultRatioDIO dio);

	/**
	 * 描述：主动发送支付模板消息
	 *
	 * @param orderId    订单id
	 * @param workId     工单id
	 * @param payMsgType 支付类型（1为定金待支付，2为完成待支付）
	 * @return
	 */
	@ApiOperation(value = "待支付模板消息", notes = "发送定金/完成 待支付模板模板消息通知给用户进行支付")
	ResponseDTO<Boolean> waitPayNoticeById(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
										   @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId,
										   @ApiParam(value = "1.为定金待支付，2.为完成待支付", required = true) @NotNull(message = "支付类型不能为空") Integer payMsgType);

	/**
	 * 描述：主动发送支付模板消息
	 * @return
	 */
	@ApiOperation(value = "待支付模板消息", notes = "发送定金/完成 待支付模板模板消息通知给用户进行支付")
	ResponseDTO<Integer> waitPayNotice(@NotNull(message = "waitPayDIO不能为空") WaitPayDIO waitPayDIO);


	/**
	 * 描述：服务完成确认模板消息
	 *
	 * @param orderId    订单id
	 * @param workId     工单id
	 * @return
	 */
	@ApiOperation(value = "服务完成确认模板消息", notes = "发送服务完成确认模板消息")
	ResponseDTO<Boolean> serviceCompleteNoticeById(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
												   @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);



	/**
	 * 描述：服务完成确认模板消息
	 *
	 * @param masterId    师傅id
	 * @return
	 */
	@ApiOperation(value = "重置app版本", notes = "重置app版本")
	ResponseDTO resetMasterAPPVersion(@ApiParam(value = "师傅ID", required = true) @NotNull(message = "masterId不能为空") Integer masterId);

	/**
	 * 描述：服务完成确认模板消息
	 *
	 * @param contactUserDIO    师傅id
	 * @return
	 */
	@ApiOperation(value = "更新联系用户时间", notes = "更新联系用户时间")
	ResponseDTO updateContactUser(ContactUserDIO contactUserDIO);


	/**
	 * 描述：跳过上门扫码
	 *
	 * @param baseRequestDIO
	 */
	@ApiOperation(value = "跳过上门扫码", notes = "跳过上门扫码")
	ResponseDTO skipVisitScan(BaseRequestDIO baseRequestDIO);

	/**
	 * 描述：发送计价器报价次数超限预警短信
	 *
	 * @param quotationWarnMsgDIO
	 */
	@ApiOperation(value = "发送计价器报价次数超限预警短信", notes = "发送计价器报价次数超限预警短信")
	ResponseDTO sendQuotationWarnMessage(QuotationWarnMsgDIO quotationWarnMsgDIO);

	/**
	 * 描述：发送四位验证码短信
	 *
	 * @param masterCaptchaDIO
	 */
	@ApiOperation(value = "发送四位验证码短信", notes = "发送四位验证码短信")
	ResponseDTO sendCaptchaMessage(MasterCaptchaDIO masterCaptchaDIO);

	/**
	 * 描述：完成清洁服务
	 *
	 * @param modifyOrderWorkAttachmentDIO
	 */
	@ApiOperation(value = "完成清洁服务")
	ResponseDTO completeCleanService(ModifyOrderWorkAttachmentDIO modifyOrderWorkAttachmentDIO);

}
